https://www.allaboutcircuits.com/worksheets/digital-to-analog-conversion/